import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './styles/element-variables.scss'
import '@/styles/index.scss' // global css
import my_message from '@/components/FMessage'
import App from './App'
import store from './store'
import router from './router'
import initialize from '@/initialize'
import moment from 'moment'
import '@/icons' // icon
import '@/permission' // permission control 路由守卫
import '@/directives/index2.js'
import '@/utils/ui.config.js'
import echarts from 'echarts'
import directivesc from '@/directives'

Vue.prototype.$my_message = my_message.install


Vue.prototype.$moment = moment
Vue.use (ElementUI)
initialize ()
Vue.config.productionTip = false
Vue.config.devtools = true
Vue.use (directivesc)
Vue.prototype.$echarts = echarts
import { generateUUID } from '@/utils'

Vue.prototype.$generateUUID = generateUUID

Vue.prototype.$echarts = echarts




// 解决样式被覆盖的问题
import './assets/css/base.css'

// 定义全局的自定义指令  选中select的值是，update的事件就会触发，原生input的blur()函数调用，input失去焦点。
Vue.directive ('blur', {
  update: function(el) {
    el.querySelector ('input').blur ()
    el.style.display = 'none';
  }
})

new Vue ({
  el: '#app',
  router,
  store,
  render: h => h (App)
}).$mount('#app')

